home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-822ext-md5-02.txt < prev    next >
Text File  |  1993-04-16  |  8KB  |  295 lines

  1.  
  2.  
  3.  
  4.           draft              Content-MD5 Header Field             Apr 10
  5.  
  6.  
  7.                            The Content-MD5 Header Field
  8.  
  9.                              Sat Apr 10 08:58:48 1993
  10.  
  11.  
  12.                                  Marshall T. Rose
  13.                            Dover Beach Consulting, Inc.
  14.                               mrose@dbc.mtview.ca.us
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                                Status of this Memo
  21.  
  22.           This document is an Internet Draft.  Internet Drafts are
  23.           working documents of the Internet Engineering Task Force
  24.           (IETF), its Areas, and its Working Groups.  Note that other
  25.           groups may also distribute working documents as Internet
  26.           Drafts.
  27.  
  28.           Internet Drafts are valid for a maximum of six months and may
  29.           be updated, replaced, or obsoleted by other documents at any
  30.           time.  It is inappropriate to use Internet Drafts as reference
  31.           material or to cite them other than as a "work in progress".
  32.  
  33.  
  34.                                      Abstract
  35.  
  36.           This memo specifies an optional header field, Content-MD5, for
  37.           use with MIME-conformant messages.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.           Expires October 10, 1993                              [Page 1]
  58.  
  59.  
  60.  
  61.  
  62.  
  63.           draft              Content-MD5 Header Field             Apr 10
  64.  
  65.  
  66.           1.  Introduction
  67.  
  68.           Despite all of the mechanisms provided by MIME [1] which
  69.           attempt to protect data from being damaged in the course of
  70.           email transport, it is still desirable to have a mechanism for
  71.           verifying that the data, once decoded, are intact.  For this
  72.           reason, this memo defines the use of an optional header field,
  73.           Content-MD5, which may be used as a message integrity check
  74.           (MIC), to verify that the decoded data are the same data that
  75.           were initially sent.
  76.  
  77.           MD5 is an algorithm for computing a 128 bit "digest" of
  78.           arbitrary-length data, with a high degree of confidence that
  79.           any alterations in the data will be reflected in alterations
  80.           in the digest.  The MD5 algorithm itself is defined in [2].
  81.           This memo specifies how the algorithm may be used as an
  82.           integrity check for MIME mail.
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.           Expires October 10, 1993                              [Page 2]
  117.  
  118.  
  119.  
  120.  
  121.  
  122.           draft              Content-MD5 Header Field             Apr 10
  123.  
  124.  
  125.           2.  Generation of the Content-MD5 Field
  126.  
  127.           The Content-MD5 field is generated by only an originating user
  128.           agent.  Message relays and gateways are expressly forbidden
  129.           from generating a Content-MD5 field.
  130.  
  131.           Use of the Content-MD5 field is completely optional, but its
  132.           use is recommended whenever data integrity is desired, but
  133.           Privacy-Enhanced Mail services [3] are not available.
  134.           (Consult Section 4 for further details.) The Content-MD5 field
  135.           may only be added to MIME entities of a `leaf' nature, i.e.,
  136.           the Content-MD5 field may be used with any content type other
  137.           than multipart or message/rfc822.
  138.  
  139.           To generate the value of the Content-MD5 field, the MD5
  140.           algorithm is computed on the canonical form of the data.  In
  141.           particular, this means that the sender applies the MD5
  142.           algorithm on the raw data, before applying any content-
  143.           transfer-encoding, and that the receiver also applies the MD5
  144.           algorithm on the raw data, after undoing any content-
  145.           transfer-encoding.  For textual data, the MD5 algorithm must
  146.           be computed on data in which the canonical form for newlines
  147.           applies, that is, in which each newline is represented by a
  148.           CR-LF pair.
  149.  
  150.           The output of the MD5 algorithm is a 128 bit digest.  When
  151.           viewed in network byte order (big-endian order), this yields a
  152.           sequence of 16 octets of binary data.  These 16 octets are
  153.           then encoded according to the base64 algorithm in order to
  154.           obtain the value that is placed in the Content-MD5 field.
  155.           Thus, if the application of the MD5 algorithm over the raw
  156.           data of a MIME entity results in a digest having the
  157.           (unlikely) value of "Check Integrity!", then that MIME
  158.           entity's header could contain the field
  159.  
  160.                Content-MD5:  Q2hlY2sgSW50ZWdyaXR5IQ==
  161.  
  162.           Finally, as discussed in Appendix B of [1], textual data is
  163.           regularly altered in the normal delivery of mail.  Because the
  164.           addition or deletion of trailing white space will result in a
  165.           different digest, either the quoted-printable or base64
  166.           algorithm should be employed as a content-transfer-encoding
  167.           when the Content-MD5 field is used.
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.           Expires October 10, 1993                              [Page 3]
  176.  
  177.  
  178.  
  179.  
  180.  
  181.           draft              Content-MD5 Header Field             Apr 10
  182.  
  183.  
  184.           3.  Processing the Content-MD5 field
  185.  
  186.           If the Content-MD5 field is present, a recipient user agent
  187.           may choose to use it to verify that the contents of a MIME
  188.           entity have not been modified during transport.  Message
  189.           relays and gateways are expressly forbidden to alter its
  190.           processing based on the presence of the Content-MD5 field.
  191.           However, a message gateway is allowed to remove the Content-
  192.           MD5 field if the corresponding MIME entity is translated into
  193.           a different content-type.
  194.  
  195.  
  196.           4.  Security Considerations
  197.  
  198.           This document specifies a data integrity service that protects
  199.           data from accidental modification while in transit from the
  200.           sender to the recipient.  A secure data integrity service,
  201.           such as that provided by Privacy Enhanced Mail [3], is
  202.           conjectured to protect data from all modifications.
  203.  
  204.  
  205.           5.  Acknowledgements
  206.  
  207.           This memo is based almost entirely on text originally written
  208.           by Nathaniel Borenstein of Bellcore.  In addition, several
  209.           improvements were suggested by Keith Moore of the University
  210.           of Tennessee, Knoxville.
  211.  
  212.  
  213.           6.  References
  214.  
  215.           [1]  N. Borenstein, N. Freed.  MIME: Mechanisms for Specifying
  216.                and Describing the Format of Internet Message Bodies.
  217.                Request for Comments 1341, (June, 1992).
  218.  
  219.           [2]  R. Rivest, The MD5 Message-Digest Algorithm.  Request for
  220.                Comments 1321, (April, 1992).
  221.  
  222.           [3]  J. Linn, Privacy Enhancement for Internet Electronic
  223.                Mail, Part I: Message Encryption and Authentication
  224.                Procedures.  Request for Comments 1421, (February, 1993).
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.           Expires October 10, 1993                              [Page 4]
  235.  
  236.  
  237.  
  238.  
  239.  
  240.           draft              Content-MD5 Header Field             Apr 10
  241.  
  242.  
  243.           Table of Contents
  244.  
  245.  
  246.           1 Introduction ..........................................    2
  247.           2 Generation of the Content-MD5 Field ...................    3
  248.           3 Processing the Content-MD5 field ......................    4
  249.           4 Security Considerations ...............................    4
  250.           5 Acknowledgements ......................................    4
  251.           6 References ............................................    4
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.           Expires October 10, 1993                              [Page 5]
  294.  
  295.